<?php
    include '../util/UploadFileUtils.php';
	
	doService();
	function doService(){
		UploadFileUtilsTest::testGetFileList();
	}
	
	class UploadFileUtilsTest{
		static function testGetFileList(){
			header("content-Type: text/html; charset=Utf-8"); 
			echo 'tst';
			$path=dirname(dirname(__FILE__)).'\\upload_file'; 
			$array=UploadFileUtils::getFileList($path);
			foreach ($array as $key => $value) {
				//将字符编码从GBK转为UTF-8
				$array[$key]=iconv('gbk', 'utf-8', $value);
			}
			print_r($array);
			print_r(json_encode($array));
		}
	}
?>